package videostoreapp;

import java.util.List;

public interface Catalogue {

	public class CatalogueInfo{
        public int id;              // unique video catalogue id
        public String catNo;	    // unique identifier for a video
        public String title;	    // video title
        public String director;	    // video director (only 1 allowed)
        public String genre;	    // video genre (only 1 allowed)
        public float price;	        // video price
        
        public CatalogueInfo(int id, String catNo, String title, String director, String genre, float price)
        {
            this.id = id;
            this.catNo = catNo;	   
            this.title = title;	 
            this.director = director;	
            this.genre = genre;	 
            this.price = price;	
        }
    }
	
    /**
     * Creates a video record in the underlying video table and returns
     * the id of the newly created record
     * @param video
     * @return
     */

    public int createVideo(CatalogueInfo video);

    /**
     * Modify attributes of a video 
     * @param video
     */
    public void modifyVideo(CatalogueInfo video);

    /**
     * Deletes a video record by id
     * @param id
     */
    public void deleteVideo(int id);

    /**
     * Returns a video record given its catalogue number
     * @param id
     * @return
     */
    public CatalogueInfo getVideoById(int id);

    /**
     * Returns a video record given its catalogue number
     * @param catNo
     * @return
     */
    public CatalogueInfo getVideoByCatalogueNumber(String catNo);

    /**
     * Returns a list of videos directed by a director
     * @param director
     * @return
     */
    public List<CatalogueInfo> getVideosByDirector(String director);

    /** 
     * Returns a list of videos for a genre
     * @param genre
     * @return
     */
    public List<CatalogueInfo> getVideosByGenre(String genre);
	
}
